﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SnmpForm.ApTrust
{
    public partial class frmApTrust : SnmpForm.APConfig.frmApConfig
    {
        protected DbWrapper.DbDataTypes.Ap m_apinfo = null;
        public frmApTrust()
        {
            m_apinfo = new DbWrapper.DbDataTypes.Ap();
            InitializeComponent();
        }
        public frmApTrust(BusinessWrapper.Ap ap):base(ap)
        {
            m_apinfo = ap.GetInfo();
            InitializeComponent();
        }
        public override bool SaveToDb()
        {
            bool bSucess = false;
            if (ucApTrust1.Update(false))
            {
                bSucess = BusinessWrapper.User.Instance.ModifyAp(ucApTrust1.GetInfo());
            }
            return bSucess;
        }

        private void frmApTrust_Load(object sender, EventArgs e)
        {
            ucApTrust1.InitWith(m_apinfo);
        }
    }
}
